﻿using Wicture.DbRESTFul;

namespace Wicture.EPC.OnlineQueryProxy.Processors
{
    public interface IQueryProcessor
    {
        /// <summary>
        /// 查询超时时间（毫秒）
        /// </summary>
        int QueryTimeOut { get; }
        /// <summary>
        /// 查询处理器的名称
        /// </summary>
        string ProcessorName { get; }
        /// <summary>
        /// 通过分析　params　参数，决定是否要处理该查询请求。
        /// </summary>
        /// <param name="params"></param>
        /// <returns></returns>
        bool Match(string @params);
        /// <summary>
        /// 处理查询结果
        /// </summary>
        object ProcessQueryResponse(QueryResponse response);

        QueryProcessorTask Task { get; }
    }

    public enum QueryProcessorTask
    {
        Vin = 1,
        PartPrice = 2,
        PartPriceAndStock = 3,
    }
}
